package com.ziyueyuwen.xiniao.bean.ao;

import com.ziyueyuwen.xiniao.enums.GradeEnum;
import com.ziyueyuwen.xiniao.enums.LessonModuleEnum;
import com.ziyueyuwen.xiniao.enums.QuestionTypeEnum;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Set;

/**
 * @author wancheng  on 2019/1/10.
 */
public class QuestionDataSaveAO{

    private Integer id;
    @NotNull(message = "type不能为空")
    private  QuestionTypeEnum type;
    @NotNull(message = "grade不能为空")
    private  GradeEnum grade;

    private String title;

    private LessonModuleEnum lessonModule;
    @NotNull(message = "difficultLevel不能为空")
    @Max(value = 5,message = "最大值为{value}")
    @Min(value = 1,message = "最小值为{value}")
    private Integer difficultLevel;
    @NotBlank(message = "questionData不能为空")
    private String questionData;

    private Set<Integer> points;

    private Integer courseId;

    private Integer lessonIndex;

    /**
     * 作业作答方式
     */
    private String answerOrder;

    private Integer questionGroup;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public QuestionTypeEnum getType() {
        return type;
    }

    public void setType(QuestionTypeEnum type) {
        this.type = type;
    }

    public GradeEnum getGrade() {
        return grade;
    }

    public void setGrade(GradeEnum grade) {
        this.grade = grade;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public LessonModuleEnum getLessonModule() {
        return lessonModule;
    }

    public void setLessonModule(LessonModuleEnum lessonModule) {
        this.lessonModule = lessonModule;
    }

    public Integer getDifficultLevel() {
        return difficultLevel;
    }

    public void setDifficultLevel(Integer difficultLevel) {
        this.difficultLevel = difficultLevel;
    }

    public String getQuestionData() {
        return questionData;
    }

    public void setQuestionData(String questionData) {
        this.questionData = questionData;
    }

    public Set<Integer> getPoints() {
        return points;
    }

    public void setPoints(Set<Integer> points) {
        this.points = points;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getLessonIndex() {
        return lessonIndex;
    }

    public void setLessonIndex(Integer lessonIndex) {
        this.lessonIndex = lessonIndex;
    }

    public String getAnswerOrder() {
        return answerOrder;
    }

    public void setAnswerOrder(String answerOrder) {
        this.answerOrder = answerOrder;
    }

    public Integer getQuestionGroup() {
        return questionGroup;
    }

    public void setQuestionGroup(Integer questionGroup) {
        this.questionGroup = questionGroup;
    }
}
